/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package calculadora1;

import java.util.ArrayList;

public class metodosCalculadora<E> implements calcInterface<E> {
    //se crea un arraylist de integer
    ArrayList<E> data;

    public metodosCalculadora(){
        //se crea un nuevo arraylist
        data = new ArrayList();
    }
    
    public void push(E item){
        //se le agrega el item al arraylist
        data.add(item);
    }
    
    public E pop(){
        //se le remueve el item al arraylist
        return data.remove(data.size()-1);
    }

    public boolean empty(){
        //se retorna si esta vacio el arraylist
        return data.size()==0;
    }
    
    public int size(){
        //se determina el tamaño del arraylist
        return data.size();
    }

    @Override
    public E peek() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
}
